<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript" src="/jquery-3.3.1.min.js"></script>
<input type="button" value="退出登录" onclick="javascript:loginOut()"/>
<p id="gg">嘎嘎嘎</p>
<br>
index

<script type="text/javascript">
    function loginOut() {
        alert($("#gg").html());
        $.get("/loginOut");
    }
</script>
</body>
</html>